package com.playmodule.vr.utils;

import android.content.Context;

import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;

public class TextResourceReader
{
  public static String readTextFileFromResource(Context paramContext, int paramInt)
  {
    try {
      StringBuilder body = new StringBuilder();
      InputStream inputStream = paramContext.getResources().openRawResource(paramInt);
      InputStreamReader inputStreamReader = new InputStreamReader(inputStream);
      BufferedReader bufferedReader = new BufferedReader(inputStreamReader);
      String nextLine;
      while ((nextLine = bufferedReader.readLine()) != null){
        body.append(nextLine);
        body.append((char)0xa);
      }
      return body.toString();
    }catch (Exception e){
    }
    return "";
  }
}

